<!DOCTYPE html>
<html>
<head>
<title>template</title>
<meta name="keywords" charset=utf-8/>
<!--[if !IE]> -->
  <script src="http://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
  <!-- <![endif]-->
  <!--[if IE]>
      <script src="http://cdn.bootcss.com/jquery/1.12.0/jquery.js"></script>
  <![endif]-->
<style>
*{
  margin:0;
  padding:0;
}

</style>
</head>
<body>
<div  id="tt">   
  <form   method="POST"   action="">   
  <div>在这个DIV里共有<span   id="t"></span>个checkbox  </div>
  <input   type="checkbox"   name="C1"   value="ON"   checked>   
  <input   type="checkbox"   name="C2"   value="ON"   checked>   
  <input   type="checkbox"   name="C3"   value="ON"   checked>   
  <input   type="checkbox"   name="C4"   value="ON"   checked>   
  <input   type="checkbox"   name="C5"   value="ON"   checked>   
  <input   type="checkbox"   name="C6"   value="ON"   checked>   
  <input   type="checkbox"   name="C7"   value="ON"   checked>   
  <input   type="checkbox"   name="C8"   value="ON"   checked>   
  </form>
</div>
<script>
var   getCK=document.getElementsByTagName('input');   
  var   j=0;   
    
  for(var   i=0;i<getCK.length;i++)   
  {   
      whichObj=getCK[i];   
      if(whichObj.type=="checkbox")   
      {   
          whichObj.checked=false;   
          j++;   
      }   
  }   
  document.getElementById('t').innerText=j;   
</script>
</body>
</html>